Java: Print and access List <String[]>
Posted
by battousai622
on Stack Overflow
See other posts from Stack Overflow
or by battousai622
Published on 2010-06-06T08:27:13Z
Indexed on
2010/06/06
8:32 UTC
Read the original article
Hit count: 378
Im reading in a file and storing it in t1. How do i access the elements in t1? When i try to print it i get addresses instead of values. Also whats the dif between string and string[]?
CSVReader reader = new CSVReader(new FileReader("src/new_acquisitions.csv"));
List <String[]> t1 = reader.readAll();
int i = 0
while(i < t1.size()) {
System.out.println(t1.get(i));
i++;
}
output:
[Ljava.lang.String;@9304b1
[Ljava.lang.String;@190d11
[Ljava.lang.String;@a90653
[Ljava.lang.String;@de6ced
© Stack Overflow or respective owner